﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;

namespace SpeechSynthesizer.Reader
{
    public class XmlDocumentRepository
    {
        private static LoadDocument loadDocument;

        private static string path = Directory.GetCurrentDirectory()+"\\processors\\phonetic_processor\\Rules.xml";

        public static XmlDocument LoadDocument(string _path)
        {
            XmlDocument document = new XmlDocument();
            document.Load(_path);

            return document;
        }

        public static LoadDocument RepositoryDocument
        {
            get
            {
                if(loadDocument==null)
                {
                    //string path = @"d:\Projects\C#\speech-synthesizer\ speech-synthesizer\SpeechSynthesizer\processors\phonetic_processor\Rules.xml";
                    loadDocument = new LoadDocument(path);
                }
                return loadDocument;
            }
        }
    }
}
